﻿using Ducu.BLL.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ducu.SRV.Query
{
    public static class OnChat
    {
        public static IQueryable<Chat> Get(this IQueryable<Chat> source, 
            User me, User with)
        {
            return source.Where(c => (c.From == me && c.To == with)
                || (c.From == with && c.To == me));
        }
    }
}
